当球与挡板碰撞时,让我们更改球的方向。

  • 删除第一个 if 语句下的.say() 指令。
  • 使用 Random Choice 来更改球的方向和速度。将其命名为 y_speed
  • 用如 [2, 3, 4]一样的正数列表替换参数。
  • 使用 Set y Speedball 的速度更改为 y_speed

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)